<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <title>Adaptor Dashboard</title>
  <meta http-equiv="X-UA-Compatible" content="IE=edge">

  <link rel="stylesheet" type="text/css" href="dashboard.css">
  <link rel="stylesheet" type="text/css" href="jquery.jqplot.min.css">

  <script type="text/javascript" src="jquery-1.6.2.min.js"></script>
  <!--[if IE]><script type="text/javascript" src="excanvas.min.js"></script><![endif]-->
  <script type="text/javascript" src="jquery.jqplot.min.js"></script>
  <script type="text/javascript" src="jqplot.canvasTextRenderer.min.js"></script>
  <script type="text/javascript" src="jqplot.canvasAxisLabelRenderer.min.js"></script>
  <script type="text/javascript" src="jqplot.dateAxisRenderer.min.js"></script>
  <script type="text/javascript" src="jqplot.highlighter.min.js"></script>
  <script type="text/javascript" src="dashboard.js"></script>
</head>
<body>
  <div>
    <button id="gaf-start-feed-push">Start Feed Push</button>
    <span id="gaf-start-feed-push-sending" style="display: none">Sending request...</span>
    <span id="gaf-start-feed-push-success" style="display: none">Feed push started</span>
    <span id="gaf-start-feed-push-already-running" style="display: none">A push is already in progress</span>
  </div>

  <div>
    <button id="gaf-check-config">Apply Updated Config</button>
    <span id="gaf-check-config-sending" style="display: none">Sending request...</span>
    <span id="gaf-check-config-updated" style="display: none">Configuration updated</span>
    <span id="gaf-check-config-not-updated" style="display: none">No configuration changes noticed; nothing updated.</span>
  </div>

  <h2>Status</h2>
  <table id="gaf-status-table"></table>

  <h2>Statistics</h2>
  Program started at: <span id="gaf-when-started"></span><br>
  Last successful full push start:
  <span id="gaf-last-successful-push-start"></span><br>
  Last successful full push end:
  <span id="gaf-last-successful-push-end"></span><br>
  Current full push:
  <span id="gaf-current-full-push"></span><br>
  Total document ids pushed: <span id="gaf-num-total-doc-ids-pushed"></span><br>
  Unique document ids pushed:
  <span id="gaf-num-unique-doc-ids-pushed"></span><br>
  GSA document requests: <span id="gaf-num-total-gsa-requests"></span><br>
  GSA Unique document requests:
  <span id="gaf-num-unique-gsa-requests"></span><br>
  Non-GSA document requests:
  <span id="gaf-num-total-non-gsa-requests"></span><br>
  Non-GSA Unique document requests:
  <span id="gaf-num-unique-non-gsa-requests"></span><br>
  Time resolution: <span id="gaf-time-resolution"></span> ms

  <h3>Throughput</h3>
  <div id="gaf-throughput-chart-minute" class="gaf-chart"></div>
  <div id="gaf-throughput-chart-hour" class="gaf-chart"></div>
  <div id="gaf-throughput-chart-day" class="gaf-chart"></div>
  <div class="gaf-post-charts-div"></div>

  <h3>Response Time</h3>
  <div id="gaf-processings-chart-minute" class="gaf-chart"></div>
  <div id="gaf-processings-chart-hour" class="gaf-chart"></div>
  <div id="gaf-processings-chart-day" class="gaf-chart"></div>
  <div class="gaf-post-charts-div"></div>

  <h2>Adaptor Configuration</h2>
  <table id="gaf-config-table"></table>

  <h2>Sensitive Value Encoding</h2>
  <p>Passwords and other security-sensitive configuration values are not saved
    as simple plain-text in the configuration. Instead, they are encoded using
    one of three methods.
    <li><strong>Plain text</strong> allows the password or other information to
      be read by anybody who can read the configuration.
    <li><strong> Obfuscated</strong> encodes the information in a highly
      unreadable format, but it is possible for anyone to retrieve the original
      text.
    <li><strong>Encrypted</strong> uses your HTTPS encryption key to encrypt the
      value. An encrypted value is tied to the encryption key, so it cannot be
      copied between Adaptors.</p>
  <p><form id="gaf-sec-form">
    Sensitive Value: <input type="password" name="secvalue" id="#gaf-sec-value">
    <br>
    <input type="radio" name="sectype" id="gaf-sec-type-pl" value="PLAIN_TEXT">
    <label for="gaf-sec-type-pl">Plain Text</label>
    <input type="radio" name="sectype" id="gaf-sec-type-obf" value="OBFUSCATED"
      checked="checked">
    <label for="gaf-sec-type-obf">Obfuscated</label>
    <input type="radio" name="sectype" id="gaf-sec-type-pkc" value="ENCRYPTED">
    <label for="gaf-sec-type-pkc">Encrypted
    <span id="gaf-sec-enc-unavailable" style="display: none">(unavailable
      because security has not been configured)</span></label><br>
    <button id="gaf-sec-runenc" type="submit">Encode Sensitive Value</button>
  </form></p>
  <p>
    Encoded Value:
    <input type="input" disabled="disabled" id="gaf-sec-encoded">
    <span id="gaf-sec-processing" style="display: none">Encoding...</span>
  </p>

  <h2>Recent Log Messages</h2>
  <pre id="gaf-log"></pre>
</body>
</html>
